﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace Web.manager
{
    public partial class StatLinkCountByGroup : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                txt_StartTime.MyDateValue = DateTime.Now.AddDays(-1).ToString();
                txt_EndTime.MyDateValue = DateTime.Now.AddDays(2).ToString();
                QueryData();
            }
        }

        public override void QueryData()
        {
            DataSet ds = PhoneBook.Manage.Stat.StatLinkCountByGroup(txt_StartTime.MyDateValue, txt_EndTime.MyDateValue);
            GVDataBind(ref GridView1, ref GV, ds);
        }

        protected void btn_query_Click(object sender, EventArgs e)
        {
            QueryData();
        }

        //导出
        protected void btn_export_Click(object sender, EventArgs e)
        {
            string filename = string.Format("StatLinkCountByGroup{0}", Commons.StringUtil.GetID_15());
            Commons.FileUtil.GridExportExcel(GridView1, filename);
        }
    }
}